<?php


namespace App\Http\Services\Admin\AdminOplogConvert;


use App\Http\Constants\ApplicationStatusConstants;
use App\Http\Constants\ClosingRuleConstants;
use App\Http\Constants\CoinsExceptionConstants;
use App\Http\Constants\VerificationModeConstants;

class ModulesApplicationConvert extends CommonConvert
{

    public function fieldMap()
    {
        return [
            'id' => 'ID',
            'name' => '应用名称',
            'description' => '应用描述',
            'app_id' => '应用appid',
            'status' => '状态',
            'verify_type' => '应用验证模式',
            'verify_url' => '自定义验证路径',
            'settle_rule_id' => '结算规则',
            'is_manual' => '是否支持手动增加红包',
            'is_deduct' => '是否支持抵扣',
            'created_at' => '创建时间',
            'updated_at' => '修改时间',
        ];

    }

    public function valueMap()
    {
        return [
            'status' => array_column(CoinsExceptionConstants::STATUS_TYPE, 'label', 'value'),
            'is_manual' => array_column(ApplicationStatusConstants::IS_MANUAL, 'label', 'value'),
            'is_deduct' => array_column(ApplicationStatusConstants::IS_DEDUCT, 'label', 'value'),
            'settle_rule_id' => array_column(ClosingRuleConstants::CLOSING_RULE, 'label', 'value'),
            'verify_type' => array_column(VerificationModeConstants::VERIFICATION_MODE, 'label', 'value'),
        ];
    }


}
